# from wsgiref import headers

import requests
from requests.auth import HTTPBasicAuth

url = 'http://127.0.0.1:8000/admin/'
headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36',
    # 'cookie': 'sessionid=u7c4qh80r3zqotappjahmzukfdzmhm5x'
}
cookies = {
    # 'sessionid': 'u7c4qh80r3zqotappjahmzukfdzmhm5x'
}
auth = HTTPBasicAuth('admin', '123456')
response = requests.get(url, headers=headers, cookies=cookies, allow_redirects=False, auth=auth)
print(response.status_code)
print(response.headers.get('location'))
print(response.text)
